/*
 * @Descripttion: GGB
 * @version: 1.0
 * @Author: GGB
 * @Date: 2021-11-20 13:44:03
 * @LastEditors: GGB
 * @LastEditTime: 2021-11-20 14:19:06
 */
import { Controller, Get, Param, ParseUUIDPipe, } from '@nestjs/common';
import { FindTeacherResponseDto } from './dto/teacher.dto';
import { TeacherService } from './teacher.service';

@Controller('teachers')
export class TeacherController {

    constructor(private readonly teacherService: TeacherService) { }

    @Get()
    getTeachers(): FindTeacherResponseDto[] {
        return this.teacherService.getTeachers()
    }

    @Get('/:teacherId')
    getTeacherById(
        @Param('teacherId', new ParseUUIDPipe()) teacherId: string
    ): FindTeacherResponseDto {
        return this.teacherService.getTeacherById(teacherId)
    }
}